package com.example.demo.model;

import com.example.demo.utils.DateUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.util.Date;


@Data
public class BlogInfo {
   private Integer id;
   @NotBlank(message = "title 不能为空")
   private String title;
   @NotBlank(message = "content 不能为空")

   private String content;
   private Integer userId;
   private Integer deleteFlag;
   private Date createTime;

   private Boolean isLoginUser;
//   private Date updateTime;
//   public String getUpdateTime(){
//      return DateUtils.format(updateTime);
//
//   }
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
      private Date updateTime;
}

